function Node.Tabs(args)
    local tabs = Node.Layout()
    tabs.layoutType = LayoutType.Horizontal
    tabs:addComponent(SwitchGroup)
    for i, v in ipairs(args) do
        local switch = Node.SwitchButton(v.name)
        switch:wh(50, 30)
        switch:addTo(tabs)
        tabs:addSwitch(switch)
    end
    return tabs
end

function Node.TabsHorizontal(args)
    local tabs = Node.Layout()
    tabs.layoutType = LayoutType.Horizontal
    tabs:addComponent(Stretch)
    tabs.height = 40
    tabs:axy(0, 0)
    tabs.stretchType = StretchType.Horizontal
    tabs:addComponent(SwitchGroup)
    local p = 1 / #args
    for i, v in ipairs(args) do
        local switch = Node.SwitchButton(v.name)
        switch.height = 40
        switch:addComponent(Stretch)
        switch.stretchType = StretchType.Horizontal
        switch.stretchPercentX = p
        switch:addTo(tabs)
        tabs:addSwitch(switch)
    end
    return tabs
end